package com.zking.dao;

import com.zking.dao.OrderDetailDao;
import com.zking.entity.OrderDetail;
import com.zking.util.DBUtil;

public class OrderDetailDao {
    public static boolean addOrderDetail(OrderDetail detail) {
        String sql = "insert into easybuy_order_detail values(null,?,?,?,?)";
        return DBUtil.update(sql,detail.getEo_id(),detail.getEp_id(),detail.getEod_quantity(),detail.getEod_cost());
    }

    public static boolean deleteOrderDetailByProductId(int ep_id){
        String sql = "delete from easybuy_order_detail where ep_id=?";
        return DBUtil.update(sql, ep_id);
    }
}
